<template>
    <div id="app">
        <div class="drag-box allow-drag"></div>
        <router-view></router-view>
    </div>
</template>

<script>
  import Cookie from 'js-cookie';

  export default {
    name: 'netdisc',
    data() {
      return {
        currentUser: '',
        currentToken: '',
        webOpenUrl: '',
      }
    },
    mounted() {
      const NODE = process.env.VUE_APP_NODE;
      let token;
      if (NODE === 'production') {
        token = Cookie.get('access_token', 'ddbes.com')
      } else {
        token = localStorage.getItem('ddbes-token')  //本地登陆
      }
      if (token && token !== '') {
        this.$http.defaults.headers.common['Authorization'] = 'Bearer ' + token
      }
    },
    methods: {}
  }
</script>

<style scoped>
    #app {
        position: relative;
    }


    .drag-box {
        z-index: -1;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: black;
        opacity: 0;
        width: 100vw;
        height: 30px;
    }
</style>
